<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>newProject.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="/estate/css/css.css"></link>
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
 <script type="text/javascript" src="/estate/ckeditor/ckeditor.js"></script>
   
   <script type="text/javascript" src="/estate/js/calender.js "  ></script>
   <script type="text/javascript" src="/estate/js/lhgcore.js"></script>
	<script type="text/javascript" src="/estate/js/lhgcalendar.js"></script>
	   		<script type="text/javascript" src="/estate/js/jquery-1.2.2.pack.js">
</script>
		<script type="text/javascript" src="/estate/js/json.js">
</script>
		<script type="text/javascript" src="/estate/js/jquery-1.3.min.js">
</script>
	<style>
		#lightbox-content{position:absolute;height:420px;width:820px;margin:-250px 0px 0px -250px;top: 50%;left: 30%;text-align: center;background-color: #FFF;border: 1px solid #000;display:none;z-index:100;overflow:hidden;padding:10px 10px 40px 10px;}
		#lightbox-content p{ margin-top:8px;}
		#lightbox-bg{position:absolute;top:0;left:0;z-index: 90;background:#000;display:none;width:100%;height:100%;_height:2000px;filter:alpha(opacity=70);-moz-opacity:0.6;opacity:0.6;}
	</style>
  </head>
  <script type="text/javascript">
  function showlightbox()
	{
	var cbArray = document.getElementsByName("checkUser");
			var userStr = "";
			for(var i = 0;i<cbArray.length;i++){
    			if(cbArray[i].checked){
    				userStr= userStr+cbArray[i].value+",";
    			}
    		}
		document.getElementById('lightbox-content').style.display='block';
		document.getElementById('lightbox-bg').style.display='block';
		document.getElementById('lightbox-iframe').src="/estate/admin/priceProjectAction.action?method=add&userStr="+userStr;
	}
	function closelightbox()
	{
		document.getElementById('lightbox-content').style.display='none';
		document.getElementById('lightbox-bg').style.display='none';
		document.getElementById('lightbox-iframe').src='about:blank';
	}
  function userChange() {
document.getElementById("testdiv").innerHTML="";
	$.get(
		      'priceProjectAction.action?method=leader&leaderId='+document.getElementById("contactUserId").value,
		     null,
		      function(data) //回传函数
		      {
		      	 var list=eval('('+data+')');
		       
		       　for(var i=0;i<list.length;i++){
		       var check=document.createElement("input");
		       var label=document.createElement("label");
		       var br=document.createElement("br");
		       check.setAttribute("id","checkUser");
		      // alert(list[i].name);
		       check.setAttribute("type","checkbox");
				check.setAttribute("value",list[i].id);
				label.setAttribute("id","id"+i);
         		document.getElementById("testdiv").appendChild(check);
         		document.getElementById("testdiv").appendChild(label);
         		document.getElementById("testdiv").appendChild(br);
         		document.getElementById("id"+i).innerHTML=list[i].name;
 　　}
		      });}
		      
	function submita(){
		var cbArray = document.getElementsByName("checkUser");
			var userStr = "";
			for(var i = 0;i<cbArray.length;i++){
    			if(cbArray[i].checked){
    				userStr= userStr+cbArray[i].value+",";
    			}
    		}
    		document.getElementById("userStr").value=userStr;
    		document.forms[0].submit();
    		alert("tijiaochenggong");
		
	}
  </script>
  <body>
  <br/>
    <form  method="post" action="priceProjectAction.action?method=add" >
    	<table width="60%" align="center" border="0" cellspacing="0" cellpadding="0" class="main">
    	<tr align="center">
    	<td colspan="4" class="tableTitle">  新建项目  </td>
    	</tr>
  <tr>
    <td width="12%" align="right" class="two">项目编号：</td>
    <td width="18%" align="left" class="two"><input type="text" name="number" id="number" class="input" /></td>
    <td width="12%" align="right" class="two">项目名称：</td>
    <td width="18%" align="left" class="two"><input type="text" name="name" id="name" class="input" /></td>
  </tr>
  <tr>
    <td align="right" class="two">委托单位：</td>
    <td align="left" class="two"><input type="text" name="delegateCompany" id="delegateCompany" class="input" /></td>
    <td align="right" class="two">委托单位联系人：</td>
    <td align="left" class="two"><input type="text" name="delegateUser" id="delegateUser" class="input" /></td>
  </tr>
  <tr>
    <td align="right" class="two">委托单位联系人电话：</td>
    <td align="left" class="two"><input type="text" name="delegatePhone" id="delegatePhone" class="input" /></td>
 <td align="right" class="two">下发日期：</td>
    <td align="left" class="two"><input type="text" class="select"  name="authorDate" id="authorDate" onclick="J.calendar.get();" readonly="readonly"/></td>  
  </tr>

  <tr>
    <td align="right" class="two">收到日期：</td>
    <td align="left" class="two"><input type="text" class="select"  name="receiveDate" id="receiveDate" onclick="J.calendar.get();" readonly="readonly"/></td>
    <td align="right" class="two">合同估算价：</td>
    <td align="left" class="two"><input type="text" class="input"  name="estimatePrice" id="estimatePrice" /></td>
  </tr>
  <tr>
    <td align="right" class="two">送审价：</td>
    <td align="left" class="two"><input type="text" class="input"  name="submitPrice" id="submitPrice" /></td>
    <td align="right" class="two">所属地区：</td>
    <td align="left" class="two"><input type="text" class="input"  name="proRegion" id="proRegion" /></td>
  </tr>
  <tr>
    <td align="right" class="two">行业分类：</td>
    <td align="left" class="two"><input type="text" class="input"  name="industryCatagory" id="industryCatagory" /></td>
    <td align="right" class="two">单位工程名称：</td>
    <td align="left" class="two"><input type="text" class="input"  name="proName" id="proName" /></td>
  </tr>
  <tr>
    <td align="right" class="two">建设单位名称：</td>
    <td align="left" class="two"><input type="text" class="input"  name="proCompany" id="proCompany" /></td>
    <td align="right" class="two">建设单位联系人：</td>
    <td align="left" class="two"><input type="text" class="input"  name="proContact" id="proContact" /></td>
  </tr>
  <tr>
    <td align="right" class="two">建设单位联系人电话：</td>
    <td align="left" class="two"><input type="text" class="input"  name="proContactPhone" id="proContactPhone" /></td>
    <td align="right" class="two">工作项目分类：</td>
    <td align="left" class="two"><input type="text" class="input"  name="workCatagory" id="workCatagory" /></td>
  </tr>
     <tr>
    <td align="right" class="two">合同ID：</td>
    <td align="left" class="two"><input type="text" name="contractId" id="contractId" class="input" /></td>
    <td align="right" class="two">咨询组长：</td>
    <td align="left" class="two"><select class="select"  name="contactUserId" id="contactUserId" onchange="userChange()">
    <c:forEach var="contactUserSelect" items="${contactUserSelect}">
    <option value="${contactUserSelect.value}">${contactUserSelect.key}</option>
  </c:forEach>
    </select></td>
  </tr>
  <tr>
    <td align="right" class="two">审减率是否超过10%：</td>
    <td align="left" class="two"><select class="select"  name="trailState" id="trailState">
    <option value=1>是</option>
    <option value=0>否</option>
    </select></td>
    <td align="right" class="two">是否是500万以上重大项目：</td>
    <td align="left" class="two"><select class="select"  name="isMajor" id="isMajor">
    <option value=1>是</option>
    <option value=0>否</option>
    </select></td>
  </tr>
  <tr>
 	<td align="right" class="two">咨询组员：	</td>
 	<td align="left" class="two" colspan="3"><div id="testdiv"></div></td>
  </tr>

  <tr>
    <td align="right" class="two">备注：</td>
    <td colspan="3" align="left" class="two"><textarea class="textarea"  name="remark" id="remark" cols="45" rows="5"></textarea><input type="text" id="userStr" name="userStr" style="display:none"/></td>
  </tr>
  <tr>

  	<td colspan="4" class="two" align="center">
  	<input onFocus="this.blur();" style="cursor:pointer" type="button" name="submitButton" id="submitButton" class="button2" onclick="submita()" value="添加" />&nbsp;&nbsp;
	<input onFocus="this.blur();" style="cursor:pointer" type="reset" name="resetButton" id="resetButton" class="button2" value="重置" />
	</td>
  </tr>
</table>
    </form>
    <div id="lightbox-bg"></div>
	<div id="lightbox-content">
    <iframe id="lightbox-iframe" width="100%" frameborder="0" scrolling="no" src="about:blank" height="100%" ></iframe> 
     <p><a href="javascript:void(0)" onclick="closelightbox()">关闭</a></p> 
    </div>
  </body>
</html>

